﻿<UserControl x:Class="AutoCover.AutoCoverMainView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.10.0"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             Name="MyToolWindow"
             Background="{DynamicResource {x:Static vsfx:VsBrushes.ToolWindowBackgroundKey}}">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        
        <TextBlock Margin="10,10,10,5" Text="{Binding Path=EngineStatusLabel}" />

        <ToggleButton Grid.Column="1" Margin="10,10,10,5" Content="Enable code coverage" IsChecked="{Binding Path=IsAutoCoverEnabled}" />
        <ToggleButton Grid.Column="2" Margin="10,10,10,5" Content="Disable highlighting" IsChecked="{Binding Path=DisableRowHighlighting}" />
        
        <ProgressBar Grid.Row="1" Grid.ColumnSpan="3" Margin="10,5,10,5" Height="5" 
                     IsIndeterminate="True" Visibility="{Binding Path=IsEngineRunningVisibility}" />
        
        <ListView Grid.Row="2" Grid.ColumnSpan="3" Margin="10,5,10,10" ItemsSource="{Binding Path=Tests}">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Name" Width="300" DisplayMemberBinding="{Binding Name}" />
                    <GridViewColumn Header="Result" DisplayMemberBinding="{Binding Result}" />
                    <GridViewColumn Header="Message" Width="600" DisplayMemberBinding="{Binding Message}" />
                </GridView>
            </ListView.View>
        </ListView>

    </Grid>
</UserControl>
